﻿namespace Pp.Domain.Mappings
{
    using Model;
    public sealed class CommentMap : EntityMap<Comment>
    {

        public CommentMap()
        {
            Table("Comments");
            Map(d => d.IsActive);
            Map(d => d.CommentText).Length(MAX_LENGTH).Not.Nullable();
            References(d => d.User, "UserId").LazyLoad();
            References(d => d.Project, "ProjectId").LazyLoad();
            Map(d => d.IsShowed);
        }
    }
}
